﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace HotelMgr.Models
{
    public class Order
    {
        /// <summary>
        /// 订单号
        /// </summary>
        [DisplayName("订单号"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int OrderID { get; set; }

        /// <summary>
        /// 人数
        /// </summary>
        [DisplayName("人数")]
        public int PeopleNumber { get; set; }
        
        /// <summary>
        /// 预定时间
        /// </summary>
        [DisplayName("预定时间")]
        public DateTime? OrderTime { get; set; }
        /// <summary>
        /// 开房时间
        /// </summary>
        [DisplayName("开房时间")]
        public DateTime? CheckInTime { get; set; }
        /// <summary>
        /// 退房时间
        /// </summary>
        [DisplayName("退房时间")]
        public DateTime? CheckOutTime { get; set; }
        /// <summary>
        /// 实际价格
        /// </summary>
        [DisplayName("实际价格")]
        [Range(0.01, 1000)]
        public decimal? ActualPrice { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("备注")]
        public string Comment { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        [DisplayName("订单状态")]
        public string Status { get; set; }

        public virtual ICollection<Room> Rooms { get; set; }
        public virtual Customer Customer { get; set; }
        //public List<OrderDetail> OrderDetails { get; set; }

    }
}